package com.loopy.tomcat;

import com.loopy.tomcat.handler.RequestHandler;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
public class TomcatV02 {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket(8080);
        System.out.println("========mytomcatV02在8080端口监听======");
        while (!serverSocket.isClosed()){
            Socket socket = serverSocket.accept();
            new Thread(new RequestHandler(socket)).start();
        }
    }
}
